package com.ferryman.bean;

/**
 * Created by Administrator on 2017/7/5.
 */
public class Student {
    private String name;
    private String age;
    private String gender;
    private String phone;

    private Student(Builder builder) {
        setName(builder.name);
        setAge(builder.age);
        setGender(builder.gender);
        setPhone(builder.phone);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public static final class Builder {
        private String name;
        private String age;
        private String gender;
        private String phone;

        private Builder() {
        }

        public Builder name(String val) {
            name = val;
            return this;
        }

        public Builder age(String val) {
            age = val;
            return this;
        }

        public Builder gender(String val) {
            gender = val;
            return this;
        }

        public Builder phone(String val) {
            phone = val;
            return this;
        }

        public Student build() {
            return new Student(this);
        }
    }
}
